<%inherit file="base.html"/>
<h2>
    ${_('Group invitation')}
</h2>
<div id="mainPanel">
    <div class="section" id="info">
        <h3>
            ${_('Create invitation')}
            <span class="inlineNav">
                <a href="http://${hexlabel}.hexlabel.net/group/">^ ${_('Back')}</a>
            </span>
        </h3>

        % if show_invitation:
            <div class="invitation">
                <h3>${_('Single-use invitation code')}</h3>
                <p class="code">${code}</p>

                % if email:
                    <p class="emailLink">
                        ${_('Email the text below to')}
                        <a href="mailto:${email}?subject=Peerscape%20Invitation&body=${inviteEmailTextEscaped}">${email}</a>
                        ${_('(clicking on this email address may do that for you).')}
                    </p>
                % else:
                    <p class="emailLink">${_('Copy the text below and email it to your friend:')}</p>
                % endif

                <form id="inviteEmailForm">
                    <textarea id="inviteEmailText" cols="40" rows="20">${inviteEmailText}</textarea>
                </form>

                <p class="backLink"><a href="http://admin.hexlabel.net/invite_group/?iid=${hexlabel}">&#171; ${_('Create another invitation..')}</a></p>
            </div>
        % else:
            <p class="intro">
                ${_('Create a membership invitation for someone who might not have a Peerscape profile yet.')}
	        </p>
            <form id="inviteForm" method="post" action="http://admin.hexlabel.net/invite_group/">
                <p>
                    <input type="hidden" name="iid" value="${iid}"/>
                </p>
                <dl class="single">
                    <dt><label for="name">${_("Person's name (optional)")}</label></dt>
                    <dd>
                        <input type="text" class="text" name="name" id="name"/>
                    </dd>
                    <dt><label for="email">${_("Person's email address (optional)")}</label></dt>
                    <dd>
                        <input type="text" class="text" name="email" id="email"/>
                    </dd>
                </dl>
                <dl>
                    <dd class="buttons">
                        <input type="submit" class="submit default" value="${_('Create invitation')}"/>
                    </dd>
                </dl>
                <div class="clr"><br/></div>
            </form>
        % endif
    </div>
</div>

<!-- defs -->
<%def name="title()">P2P Fusion - Peerscape | ${profile_fields['generic']['name']['values'][0]['value']} | ${_('Invite')}</%def>
<%def name="body_class()">
    % if is_member:
  	    admin group member
    % else:
  	    admin group
    % endif
</%def>
<%def name="toplinks_style()">
</%def>

